<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "dh_bus_shopping_cart".
 *
 * @property integer $id
 * @property integer $s_goods_id
 * @property integer $site_id
 * @property integer $create_time
 * @property string $session_id
 * @property integer $user_id
 * @property integer $s_goods_num
 */
class BusShoppingCart extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dh_bus_shopping_cart';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['s_goods_id', 'site_id', 'create_time', 'user_id', 's_goods_num'], 'required'],
            [['s_goods_id', 'site_id', 'create_time', 'user_id', 's_goods_num'], 'integer'],
            [['session_id'], 'string', 'max' => 32]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '编号',
            's_goods_id' => '供应商商品ID',
            'site_id' => '站点ID',
            'create_time' => '添加时间',
            'session_id' => 'session_id',
            'user_id' => 'User ID',
            's_goods_num' => '供应商商品数量',
        ];
    }
}
